<?php
	class Order_offline_course extends MY_controller{

		function __construct(){
			parent::__construct();
		}

		function index($limit = 0)
		{
			$school_id = 0;
			$get_school_id = $this->input->get('school_id');	
			if(empty($get_school_id)==false){
				$school_id = $this->input->get('school_id');
			}
			
			//获取网校
			$this->load->model('Schools');
			$schools = $this->Schools->get_school_all();
			$this->smarty->assign("schools", $schools);

			//获取订单
			$this->load->model('Order_model');
			$orders = $this->Order_model->get_order_list($limit,$this->offset,$school_id);
			$this->smarty->assign("orders", $orders['result']);

			$this->smarty->assign("current_url", "/order_offline_course");

			$this->load->library('pagination');
			$page_config['base_url'] = '/order_offline_course/index';
			$page_config['total_rows'] = $orders['count'];
			$page_config['per_page'] = $this->offset;
			$page_config['uri_segment'] = 3;
			$this->pagination->initialize($page_config);
			$pagination = $this->pagination->create_links();

			$this->smarty->assign("school_id", $school_id);
			$this->smarty->assign("pagination", $pagination);
			$this->smarty->assign("action", "网校订单列表");
			$this->smarty->assign("menu", "course");
			$this->smarty->display("order/order_offline_course.html");


		}

}